package cn.finedo.common;

public class PageParamDomain extends BaseDomain {
    private static final long serialVersionUID = 1L;
    private int pageindex;
    private int rownumperpage;
    private String startrow;
    private String primarykey;
    private String sql;

    public PageParamDomain() {
    }

    public static PageParamDomain getDefault(PageParamDomain ppd, String primarykey) {
        if (ppd == null) {
            ppd = new PageParamDomain();
            ppd.setPageindex(1);
        }

        ppd.setPrimarykey(primarykey);
        return ppd;
    }

    public PageParamDomain(int pageindex, int rownumperpage) {
        this.pageindex = pageindex;
        this.rownumperpage = rownumperpage;
    }

    public String getSql() {
        return this.sql;
    }

    public void setSql(String sql) {
        this.sql = sql;
    }

    public int getPageindex() {
        return this.pageindex;
    }

    public void setPageindex(int pageindex) {
        this.pageindex = pageindex;
    }

    public int getRownumperpage() {
        return this.rownumperpage;
    }

    public void setRownumperpage(int rownumperpage) {
        this.rownumperpage = rownumperpage;
    }

    public String getStartrow() {
        return this.startrow;
    }

    public void setStartrow(String startrow) {
        this.startrow = startrow;
    }

    public String getPrimarykey() {
        return this.primarykey;
    }

    public void setPrimarykey(String primarykey) {
        this.primarykey = primarykey;
    }
}
